<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <span>登录人信息：</span><input type="text" id="name"><br>

    <script src="./jquery-3.7.1.min.js"></script>
    <script>
        $.ajax({
            type: "get",
            url: "/user/getLoginUser",
            success: function(userName){
                //后端返回了数据信息
                $("#name").val(userName);
            }
        });
    </script>
</body>
</html>

